package com.example.tutormanagement.service.impl;

import com.example.tutormanagement.mapper.ScheduleMapper;
import com.example.tutormanagement.pojo.Schedule;
import com.example.tutormanagement.service.ScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * &#064;Date: 23/06/15-14:37
 * &#064;Description:
 */
@Service
public class ScheduleServiceImpl implements ScheduleService {

    @Autowired
    private ScheduleMapper scheduleMapper;

    @Override
    public List<Schedule> list() {
        return scheduleMapper.list();
    }

    @Override
    public void update(Schedule schedule, String id) {
        schedule.setPid(id);
        scheduleMapper.update(schedule);
    }

    @Override
    public void insert(Schedule schedule) {
        scheduleMapper.insert(schedule);
    }

    @Override
    public Schedule select(String id) {
        return scheduleMapper.select(id);
    }

    @Override
    public void delete(String id) {
        scheduleMapper.delete(id);
    }
}
